-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: Use relative Jsonnet imports internally #238
base: main
Are you sure you want to change the base?
Conversation
@@ -1,5 +1,5 @@ | |||
local receiveConfigDefaults = import 'kube-thanos/kube-thanos-receive-default-params.libsonnet'; | |||
local receive = import 'kube-thanos/kube-thanos-receive.libsonnet'; | |||
local receiveConfigDefaults = import './kube-thanos-receive-default-params.libsonnet'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you can use full import path of github.com/thanos-io/kube-thanos/jsonnet/kube-thanos/kube-thanos-receive-default-params.libsonnet
which is guaranteed to be correct and allows to ditch legacy imports in jsonnet-bundler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is how I use the library, but why would you do that in the library?
And it is still not guaranteed to work, for example here how it is installed in the repo itself:
Lines 4 to 11 in e1a6859
{ | |
"source": { | |
"local": { | |
"directory": "jsonnet/kube-thanos" | |
} | |
}, | |
"version": "." | |
} |
It create
vendor/kube-thanos
. It it not guarantee either that the user will use jb
, especially that this library does not have any dependency. Another problematic case is if the user wants to use a fork, they need to rename those imports before being able to use it.
...and disable jb's legacy imports Signed-off-by: Maxime Brunet <maxime.brunet@paytm.com>
2e6d0fc
to
9d344ab
Compare
@kakkoyun @metalmatze any concerns about merging this one if I rebase? |
Changes
jb
's legacy imports (not used, but making sure they are not accidentally used in the future)Reasons:
kube-thanos/
is a valid import path for the end-userjb
's legacy imports which are deprecatedVerification
CI passes.